<include file="Public:header" />
<link href="__PUBLIC__/Catalog/css/detailsmm.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="{:U('Products/detail')}?pid={$pid}" id="back"> < </a>拍卖出价
         </div>
   </div>
   <div class="content">
   	  <form aciton="{:U('Products/auction')}" method="post" id="auctionform">
   	  <input type="hidden" name="pid" value="{$pid}"/>
   	  <div class="des">当前价：
   	  		<if condition="$nflag eq 1">￥{$nowprice.price}<input type="hidden" name="oldprice" id="oldprice" value="{$nowprice.price}"/>
			<else/>￥{$nowprice.products_paimai_price}<input type="hidden" name="oldprice" id="oldprice" value="{$nowprice.products_paimai_price}"/>
			</if>
   	  </div>
   	  <div class="des">出价：<input type="text" style="border:1px solid #ccc;" name="price" id="price" value=""/>元</div>
   	  <div class="des">1.请超过当前价 2.请一口价购买</div>
   	  <div id="ads">
         	<a href="javascript:$('#buyconfirm').css('display','block');" style="margin-left:20px;"  class="xiadan">一口价￥{$nowprice.products_price}</a>
         	<input type="button" class="xiadan" name="tijiao" id="tijiao" onclick="javascript:checkprice();" value="出价"/>
      </div>
   	  </form>
      
   </div>
</div>
<div class="foot1" style="display:none;" id="buyconfirm">
    <div class="foot2">
        <span class="foot2i">确认提示：</span>
        <a class="foot2x" onclick="javascript:$('#buyconfirm').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
    	<p>建议您先联系卖家确认后再行购买</p>
        <a class="go" id="havenshow" href="{:U('Order/index')}?pid={$pid}">已确认</a>
        <a class="del" id="noshow"  href="javascript:$('#buyconfirm').css('display','none');">再看看</a>
    </div>
</div>
<script>
$(function(){
    if('{$msg}'!='0'){
        alert('{$msg}');
    }
});
function checkprice(){
	var oldprice = $('#oldprice').val();
	var nowprice = $('#price').val();
	if(oldprice>=nowprice){
		alert('出价必须超过当前价！');
	}else{
		$('#auctionform').submit();
	}
}
</script>
<include file="Public:footer" />